﻿<Window x:Class="MaxAlarm.Windows.AlarmWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Windows="clr-namespace:MaxAlarm.Windows"
        Height="120" Width="400"
        WindowStyle="None"
        ResizeMode="NoResize"
        AllowsTransparency="True"
        Topmost="True"
        ShowInTaskbar="False"
        Loaded="WindowLoaded">
    <Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Windows:AlarmWindow}}}">
        <Border Background="#6E6E6E"
		        BorderBrush="White"
		        BorderThickness="1">
            
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="{Binding Path=AlarmItems.Count, StringFormat=Alarms ({0:D})}"
                               VerticalAlignment="Center"
                               HorizontalAlignment="Center"
                               Margin="5,0,0,0"
                               Foreground="White"
				               FontSize="14" 
				               FontFamily="Segoe UI"
				               FontStretch="Expanded"/>
                    
                    <Button Margin="2"
                            Grid.Column="1"
				            VerticalAlignment="Center"
				            HorizontalAlignment="Center"
				            Style="{StaticResource WindowButtonStyle}"
				            Click="CloseWindow">

                        <Canvas Width="10"
					            Height="10"
					            Background="{StaticResource CloseBrush}"/>
                    </Button>

                </Grid>

                <Canvas Background="{StaticResource LineBrush}"
				        Grid.ColumnSpan="2"
				        Height="1"
				        HorizontalAlignment="Stretch"
				        VerticalAlignment="Bottom"
				        Margin="2,0,2,0" />

                <TextBlock Text="{Binding Path=Title}"
                           VerticalAlignment="Top"
                           HorizontalAlignment="Left"
                           Margin="5"
                           Foreground="White"
				           FontSize="12" 
				           FontFamily="Segoe UI"
				           FontStretch="Expanded"
                           Grid.Row="1"
                           TextWrapping="Wrap"/>
                
            </Grid>

            

        </Border>
    </Grid>
</Window>
